﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using Cloak.NUnit;
using Cloak.Reflection;
using NUnit.Framework;

namespace Ruleweaver.Rules
{
	public class CreateFixedRule : Behavior
	{
		private bool _passes;
		private FixedRule _fixedRule;

		protected override void Given()
		{
			_passes = true;
		}

		protected override void When()
		{
			_fixedRule = Rule.Fixed(_passes);
		}

		[Then]
		public void HasPassesValue()
		{
			Assert.AreEqual(_passes, _fixedRule.Passes);
		}

		[Then]
		public void HasFixedType()
		{
			Assert.AreEqual(RuleType.Fixed, _fixedRule.Type);
		}
	}
}